{include file="public/nheader" /}
<div class="layui-fluid">
    <div class="layui-card">
        <!-- // 默认操作按钮 -->
        <div class="layui-card-header layadmin-card-header-auto ">
            <div class="layui-form">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <div class="layui-input-inline ">
                            <select name="paytype" lay-search>
                                <option value="">支付端口</option>
                                <option value="1" {if !empty(input('get.paytype')) &&
                                    input('get.paytype')==1}selected{/if}>
                                    微信端</option>
                                <option value="2" {if !empty(input('get.paytype')) &&
                                    input('get.paytype')==2}selected{/if}>
                                    抖音端</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline ">
                            <select name="type" lay-search>
                                <option value="">支付类型</option>
                                <option value="1" {if !empty(input('get.type')) && input('get.type')==1}selected{/if}>
                                    订单支付</option>
                                <option value="2" {if !empty(input('get.type')) && input('get.type')==2}selected{/if}>
                                    购买会员</option>
                                <option value="3" {if !empty(input('get.type')) && input('get.type')==3}selected{/if}>
                                    积分商城</option>
                                <option value="4" {if !empty(input('get.type')) && input('get.type')==4}selected{/if}>
                                    余额充值</option>
                                <option value="5" {if !empty(input('get.type')) && input('get.type')==5}selected{/if}>
                                    购买套餐</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline ">
                            <select name="refund" lay-search>
                                <option value="">是否退款</option>
                                <option value="1" {if !empty(input('get.refund')) &&
                                    input('get.refund')==1}selected{/if}>
                                    否</option>
                                <option value="2" {if !empty(input('get.refund')) &&
                                    input('get.refund')==2}selected{/if}>
                                    是</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline ">
                            <input name="title" class="layui-input" type="text" placeholder="用户ID|本平台订单号|第三方支付交易号" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <!-- // 默认搜索 -->
                        <button class="layui-btn icon-btn" lay-filter="formSearch" lay-submit>搜索</button>
                    </div>
                </div>
            </div>
        </div>

        <!-- // 创建数据实例 -->
        <table id="lay-tableList" lay-filter="lay-tableList"></table>
    </div>
</div>
{include file="public/nfooter"}
<script>
    layui.use(['table'], function () {
        var table = layui.table;
        /*
         * 初始化表格
        */
        var isTable = table.render({
            elem: "#lay-tableList"
            , url: "{:url()}"
            , page: true
            , size: 'lg'
            , even: true
            , cols: [[
                // { type: 'checkbox', width: 60 },
                { field: 'id', align: 'center', sort: true, width: 80, title: 'ID' },
                { field: 'user_id', align: 'center', width: 200, title: '用户ID' },
                { field: 'money', align: 'center', width: 200, title: '支付金额' },
                {
                    field: 'paytype', align: 'center', width: 120, templet: function (d) {
                        if (d.paytype == 1) {
                            return '微信端';
                        }
                        if (d.paytype == 2) {
                            return '抖音端';
                        }
                        return '未知';
                    }, title: '支付端口'
                },
                {
                    field: 'type', align: 'center', width: 120, templet: function (d) {
                        if (d.type == 1) {
                            return '订单支付';
                        }
                        if (d.type == 2) {
                            return '会员支付';
                        }
                        if (d.type == 3) {
                            return '积分商城';
                        }
                        if (d.type == 4) {
                            return '余额充值';
                        }
                        if (d.type == 5) {
                            return '购买套餐';
                        }
                        return '未知';
                    }, title: '支付类型'
                },
                {
                    field: 'status', align: 'center', width: 120, templet: function (d) {
                        if (d.status == 1) {
                            return '未支付';
                        }
                        if (d.status == 2) {
                            return '已支付';
                        }
                        return '未知';
                    }, title: '是否支付'
                },
                { field: 'paymentid', align: 'center', width: 200, title: '平台订单号' },
                { field: 'out_refund_no', align: 'center', width: 300, title: '支付方交易号' },
                { field: 'ordersn', align: 'center', width: 200, title: '订单号(类型为支付订单可查)'},
                {
                    field: 'refund', align: 'center', width: 120, templet: function (d) {
                        if (d.refund == 1) {
                            return '正常';
                        }
                        if (d.refund == 2) {
                            return '已退款';
                        }
                        return '未知';
                    }, title: '是否退款'
                },
                { field: 'created', width: 200, align: 'center', title: '创建支付时间' },
            ]]
        })
    })
</script>
</body>